package com.bwie.controller;

import com.bwie.pojo.TbShop;
import com.bwie.service.TbShopService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: week0626
 * @package: com.bwie.controller
 * @className: ShopController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/6/26 10:20
 * @version: 1.0
 */
@RestController
@RequestMapping("/user/shop")
public class ShopController {


    @Autowired
    TbShopService tbShopService;

    @PostMapping("/getShopList")
    public R getShopList(@RequestBody PageInfoVo pageInfoVo) {
        return tbShopService.getShopList(pageInfoVo);
    }

    @PostMapping("/addShop")
    public R addShop(@RequestBody @Validated TbShop tbShop) {
        return tbShopService.addShop(tbShop);
    }


}
